package ma.platform.server.upms.rpc;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jakarta.annotation.Resource;
import ma.platform.server.auth.endpoint.PigTokenEndpoint;
import ma.platform.server.core.util.R;
import ma.platform.server.upms.api.rpc.RemoteTokenService;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * Copyright:
 * Author:
 * Description:
 * Created by 李林山 on 2024/8/18
 */
@Component
public class RemoteTokenServiceImpl implements RemoteTokenService {

    @Resource
    private PigTokenEndpoint pigTokenEndpoint;

    @Override
    public R<Page> getTokenPage(Map<String, Object> params) {
        return pigTokenEndpoint.tokenList(params);
    }

    @Override
    public R<Boolean> removeTokenById(String token) {
        return pigTokenEndpoint.removeToken(token);
    }

    @Override
    public R<Map<String, Object>> queryToken(String token) {
      return R.ok();
    }
}
